-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added length
for Set, IntSet and HashTable
#454
Conversation
The idea was to use |
I understand the idea behind this, but then it makes it impossible to write a comprehension with an unordered collection. As a prior, Python uses |
I'll close this since I decided to take this suggestion even farther, and simplify things by only using length. |
Great, thanks ! |
For the record, I retroactively concur. |
dependencis -> dependencies
…uate arguments immediately. Add the ability to evaluate some parts of a `@spawn`/`@async` immediately, in the current thread context. This prevents variables being "boxed" in order to capture them in the closure, exactly the same as wrapping them in a let-block locally. For example, `$x` expands like this: ```julia julia> @macroexpand @async $x + 2 quote #= task.jl:361 =# let var"#JuliaLang#454" = x #= task.jl:362 =# local var"JuliaLang#9#task" = Base.Task((()->begin #= task.jl:358 =# var"#JuliaLang#454" + 2 end)) #= task.jl:363 =# if $(Expr(:islocal, Symbol("##sync#95"))) #= task.jl:364 =# Base.push!(var"##sync#95", var"JuliaLang#9#task") end #= task.jl:366 =# Base.schedule(var"JuliaLang#9#task") #= task.jl:367 =# var"JuliaLang#9#task" end end ```
…immediately (#33119) Adds $-interpolation syntax to `@async` and `Threads.@spawn`, to evaluate arguments immediately. Add the ability to evaluate some parts of a `@spawn`/`@async` immediately, in the current thread context. This prevents variables being "boxed" in order to capture them in the closure, exactly the same as wrapping them in a let-block locally. For example, `$x` expands like this: ```julia julia> @macroexpand @async $x + 2 quote #= task.jl:361 =# let var"##454" = x #= task.jl:362 =# local var"#9#task" = Base.Task((()->begin #= task.jl:358 =# var"##454" + 2 end)) #= task.jl:363 =# if $(Expr(:islocal, Symbol("##sync#95"))) #= task.jl:364 =# Base.push!(var"##sync#95", var"#9#task") end #= task.jl:366 =# Base.schedule(var"#9#task") #= task.jl:367 =# var"#9#task" end end ```
…immediately (#33119) Adds $-interpolation syntax to `@async` and `Threads.@spawn`, to evaluate arguments immediately. Add the ability to evaluate some parts of a `@spawn`/`@async` immediately, in the current thread context. This prevents variables being "boxed" in order to capture them in the closure, exactly the same as wrapping them in a let-block locally. For example, `$x` expands like this: ```julia julia> @macroexpand @async $x + 2 quote #= task.jl:361 =# let var"##454" = x #= task.jl:362 =# local var"#9#task" = Base.Task((()->begin #= task.jl:358 =# var"##454" + 2 end)) #= task.jl:363 =# if $(Expr(:islocal, Symbol("##sync#95"))) #= task.jl:364 =# Base.push!(var"##sync#95", var"#9#task") end #= task.jl:366 =# Base.schedule(var"#9#task") #= task.jl:367 =# var"#9#task" end end ```
This supports SSAValue args for cglobal while also fixing a bug in which a GotoIfNot ended up going to the wrong statement. The latter was a consequence of incorrect :call unnesting. Fixes #455 Fixes #454 Fixes #415 Fixes JuliaDebug/Debugger.jl#275 Improves #354
The absence of
length
for those types caused errors when using comprehensions such as :